

define([ "Zepto", "underscore", "Backbone", "Handlebars",
         "views/hall/ufoundsitemview"
         ], function($, _, Backbone, Handlebars, UfoundsItemView, template) {

	var UpeventView = Backbone.View.extend({

		template : Handlebars.compile(template),

		render : function(eventName) {
			
			$(this.el).empty();

			_.each(this.model.models, function(element) {
				$(this.el).append(new UfoundsItemView({
					tagName : 'a', //Crea un nuovo tag <a> invece di usarne uno già presente nel DOM
					attributes : {
						'href' : '#user/'+element.get('utente').objectId 
					},
					model : element
				}).render().el);
			}, this);  
			
			var whoareherescroll = new iScroll('whoarehere',
                                  { useTransition:false,
                                    checkDOMChanges: true,
                                    hideScrollbar: true,
                                    fixedScrollbar:true });
		}

	});
	

	return UpeventView;
});
